/**
 * Copyright (c) 2009 Cerner Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Cerner Corporation - initial API and implementation
 */
package com.cerner.system.rest.jaas.cas;

import java.net.URI;

import org.restlet.Client;

/**
 * Internal factory to create instances of {@code CasTicketConnector}.
 * 
 * @author Alex Horn
 * @since 1.0.0
 */
class CasTicketConnectorProvider {

  private final Client client;

  CasTicketConnectorProvider(Client client) {
    this.client = client;
  }

  /**
   * Inject the {@code casLoginUrl} and {@code TGT} into a newly instantiated
   * {@link CasTicketConnector} object.
   */
  CasTicketConnector get(URI casLoginUrl, String casTicketGrantingTicket) {
    return new CasTicketConnector(this.client, casLoginUrl,
        casTicketGrantingTicket);
  }
}
